import { ModalForm, ProFormSelect, ProFormText } from '@ant-design/pro-components';
import React from 'react';

type Props = {
  OnOpenChange: (open: boolean) => void; // ...
  Open: boolean;
};

const ChangeAdd: React.FC<Props> = (props) => {
  return (
    <ModalForm title={'新建变更'} onOpenChange={props.OnOpenChange} open={props.Open}>
      <ProFormText
        placeholder={'输入变更名称'}
        label={'变更名称'}
        name={'name'}
        rules={[{ required: true }]}
      />
      <ProFormSelect
        label={'归属应用'}
        name={'appName'}
        rules={[{ required: true }]}
        options={[
          { label: 'springboot-demo', value: 'springboot-demo' },
          { label: 'springboot-demo111', value: 'springboot-demo111' },
        ]}
        disabled={true}
        initialValue={'springboot-demo'}
      />
      <ProFormSelect
        label={'变更分支'}
        name={'appName'}
        rules={[{ required: true }]}
        options={[
          { label: 'springboot-demo', value: 'springboot-demo' },
          { label: 'springboot-demo111', value: 'springboot-demo111' },
        ]}
        disabled={true}
        initialValue={'springboot-demo'}
      />
    </ModalForm>
  );
};

export default ChangeAdd;
